home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-14 | 830 b | 48 lines | [TEXT/MPS ] |
- # StripUnits - Remove the ckid resource from a list of files.
- #
- # Usage: StripUnits files…
- #
- # StripUnits removes the unit resource (if it exists) from a
- # list of files.
- #
- # © Apple Computer, Inc. 1988
- # All rights reserved.
-
- Set Exit 0
-
- # Check the parameters
-
- If {#} == 0
- Echo "### Usage - {0} files…" > dev:stderr
- Exit 1
- End
-
-
- For name in {"parameters"}
- Begin
- If "`Exists -f "{name}"`" != ""
- Set path `Files -f "{name}"`
- Set wind 0
- For i in `Windows`
- If "{path}" == "{i}"
- Set wind 1
- Break
- End
- End
- Echo "Delete 'unit';" | Rez -a -o "{name}"
- If {wind}
- If "{path}" == "{active}"
- Close "{name}"
- Open "{name}"
- Else
- Close "{name}"
- Target "{name}"
- End
- End
- Else
- Echo "### {0}" - File "'{name}'" does not exist. > dev:stderr
- Exit 2
- End
- End
- End
-